﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NutriLeaf.Web.Model;

namespace NutriLeaf.Web.Core.Account
{
    public interface IRole
    {
        void AddUserToRole(int userId, RoleType role,ref NutriLeafDBEntities context);

        void AddUserToRole(Model.User user, RoleType role, ref NutriLeafDBEntities context);

        void RemoveUserRole(Model.User user, ref NutriLeafDBEntities context);

        void RemoveUserRole(int userId, ref NutriLeafDBEntities context);

        bool IsInRole(Model.User user, RoleType role, ref NutriLeafDBEntities context);

        bool IsInRole(int userId, RoleType role, ref NutriLeafDBEntities context);

        RoleType GetUserRole(Model.User user, ref NutriLeafDBEntities context);

        RoleType GetUserRole(int userId, ref NutriLeafDBEntities context);

    }
}